<template>
  <div class="task-list">
    <el-empty :image-size="100" description="暂无数据" v-if="state.saveorder.list.length == 0" />
    <template v-else>
      <el-table :data="state.saveorder.list" height="200" style="width: 100%">
        <el-table-column prop="date" label="" width="20">
          <template #default="scope">
            <div>
              <img
                style="width: 6px"
                src="@/assets/home/task-success.png"
                v-if="scope.row.place_status == 2"
              />
              <img style="width: 6px" src="@/assets/home/task-fail.png" v-else />
            </div>
          </template>
        </el-table-column>
        <el-table-column prop="name" label="盘口" show-overflow-tooltip>
          <template #default="scope">
            <div class="hidden1">{{ scope.row.pk_odds_key_ch }}@{{scope.row.place_odds_info}}</div>
          </template>
        </el-table-column>
        <el-table-column prop="address" label="联赛" show-overflow-tooltip>
          <template #default="scope">
            <div class="hidden1">{{ scope.row.minfo.league_name }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="address" label="主队" show-overflow-tooltip>
          <template #default="scope">
            <div class="hidden1">{{ scope.row.minfo.home_name }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="address" label="客队" show-overflow-tooltip>
          <template #default="scope">
            <div class="hidden1">{{ scope.row.minfo.away_name }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="address" label="下单金额" width="70">
          <template #default="scope">
            <div class="hidden1">{{ scope.row.real_amount }}</div>
          </template>
        </el-table-column>
      </el-table>
    </template>
  </div>
</template>

<script setup>
const { store, state } = inject('Sell')

const column = ['联赛', '主队', '客队', '下单金额', '盘口']
</script>

<style lang="scss" scoped>
.task-list {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.hidden1 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1; /* 显示的行数 */
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>


<style>
.task-list th.el-table__cell {
  height: 32px;
  min-height: 32px;
  padding: 0;
}
.task-list th.el-table__cell .cell {
  line-height: 32px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
}
.task-list td.el-table__cell {
  height: 28px;
  min-height: 28px;
  padding: 4px 0;
}
.task-list td.el-table__cell .cell {
  line-height: 28px;
  padding: 0 4px;
  font-size: 12px;
}
.task-list tbody .el-table__row td .el-tooltip {
  white-space: break-spaces !important;
}
</style>